<!-- BLOCK MẪU HỢP ĐỒNG GIAO DỊCH -->
<?php
	$sql = "SELECT * FROM categories_documents ORDER BY id DESC LIMIT 10";
	$connection = yii::app()->db;
	$command = $connection->createCommand($sql);
	$result =  $command->queryAll();
?>
<div class="block block-file full-hover">
	<h2 class="title title-bd"><a href="<?php echo PIUrl::createUrl('/home/document');?>"><?php echo translate("Mẫu hợp đồng giao dịch"); ?></a></h2>
	<?php if(!empty($result)){ ?>
		<ul>
			<?php foreach($result as $row){ ?>
				<li title="<?php echo $row['name']; ?>">
					<a href="<?php echo PIUrl::createUrl('/home/document',array('#'=>$row['id']));?>"><?php echo $this->word_limiter($row['name'], 8); ?><i class="icon icon-file pull-right"></i></a>
				</li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>
